package com.zsh.myserver.exception;

/**
 * Copyright (C), 2020-2020
 * Author: Zhoushaohua
 * Date: 2020/4/11 15:33
 * Description: 自定义Http异常
 */
public class HttpException extends RuntimeException {
    private Integer code;
    private Integer httpStatusCode = 500;//http状态码，服务器异常码

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getHttpStatusCode() {
        return httpStatusCode;
    }

    public void setHttpStatusCode(Integer httpStatusCode) {
        this.httpStatusCode = httpStatusCode;
    }

    @Override
    public String toString() {
        return "HttpException{" +
                "code=" + code +
                ", httpStatusCode=" + httpStatusCode +
                '}';
    }
}
